<template>
  <div>
    <el-table
      :data="list"
      height="200"
      stripe
      border
      style="width: 100%"
      @current-change="handleCurrentChange"
      @row-click="handleTableRow"
      highlight-current-row
    >
      <el-table-column
        prop="className"
        label="小班姓名"
        width="180"
      ></el-table-column>
      <el-table-column
        prop="head"
        label="负责人"
        width="180"
      ></el-table-column>
      <el-table-column
        prop="headTel"
        label="负责人电话"
        width="400"
      ></el-table-column>
      <el-table-column
        prop="regionBean.regionName"
        label="负责区域"
        width="400"
      ></el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [],
      classParam:{
        pageNO: "1",
        pageSize: "3",
        className:"",
        regionName:""
      },
    };
  },
  methods: {
    async findByItem() {
      let list = await this.ajax.getSubmit(
        "/api/class/findByItem",
        this.classParam
      );

      this.list = list.records;
      console.log(this.list);
    },
    handleTableRow(row) {
      console.log(row.diseaseId);
      this.diseaseId = row.diseaseId;
    },
    handleCurrentChange(val) {
      this.currentRow = val;
      console.val;
    },
    handleClose(done) {
      this.$confirm("确认关闭？")
        .then((_) => {
          done();
        })
        .catch((_) => {});
    },
  },
  created(){
    this.findByItem()
  }
};
</script>

<style>

</style>